Made it so that nothing runs if images fail to load. This removes the variables undefined errors that are caused by a failed image load. Also made it so that double expanding is impossible is it doesnt work.