James C - fixed some minor bugs