fixes and closed #249