New Bug Fix

Fixed issues with windows not closing when the application is closed.