corrected two minor bugs