1997 volvo s40 - central locking problem - gtijohn

Hi there i have a problem with the central locking on my car, when i use the fob to open the car doors it works fine the indicators flash and the doors open. However when i use it to lock them, the doors lock and the indicators flash solid like they should but then the hazards come on and stay on. How can i fix this please help.