- bug fix and added test