Made compatible with the latest version of spooky element