Bug fixes (NOT FUNCTIONAL)