Fixed some nagging bugs.