implmented toggle backdrop and fixed flashing issue