fix errors being thrown when used on colorbox containers