Implemented a Patch given through Gist by Ryochan7 to fix errors occuring in the random block blocktype when the gallery specified did not exist in database