Fixed problem with overlay resetting the background
Found a statetype variable I missed, and a couple other errors:S