JS doesn't like my conditions