#50 fix for logic