Fixing some logicical issues...