Only switch buffer when it's not visible
Handle messages in eval