Clamshell Monitor Bug

I'm using a late 2013 15" MBP connected to a lone display in clamshell mode via the HDMI port. When disconnecting the monitor and opening the lid, chaos ensues. Airplay gets disabled and I can't modify display settings until logging out and back in or rebooting.