Here is how to fix it.
Open the terminal and enter the following commands
cd /etc/NetworkManager/system-connections/ sudo nano my_wifi_access_point_name
Remove the line containing the mac-address. Then press ctrl-x and type
y
to confirm the changes, and press enter. Now on restart wifi should connect automatically.