Some bug fixes, Mantis Issues: 193, 191, 192, 196, 199, 200