Fixed a few long standing bug		s