FIX: fixed bags #1,#2