Fixed several minor issues