Feature/background bugs

This should fix #25 and #26 hopefully. Not closing them until tested with the server.