Added if to not display black page, hopefully