Addressed several minor bugs