added some checks that allow code to run and fixed sherlock theme