fixes small errors introduced throughout code