Fixed errors mentioned after closing previous commit to #254