fix black screen and create function for closing blit engine