fixed minor bugs with new feature