fixed conditional causing error