Another thing was causing problems was the channel I was using on the router. It was configured as auto. So I changed to channel 6 (in my case).
The problem is solved in my case after these changes.
Regards.