fixing black border bug