Modified to work with altered floating-dialogue interface.