fixed bug which caused code to not compile