Fix black image bug