Hello there! Sounds like the configuration file that is saved on your imac might be having issues. No worries though we can fix it by doing the following.
1.Turn off your imac ( click the apple icon and select shutdown)
2. Disconnect the power cable.
3. Hold the power button for 30 seconds.
4. Reconnect the power cable.
5. Locate the following keys on the keyboard: Option, Command (⌘), P, and R. Push and hold these keys
6.Turn on your Mac while holding the keys.
7.Continue holding the keys down until your Mac restarts, and you hear the startup sound for the second time.