Fixed some bad conditions