updated and fix jasmine test bug