fixed case statements

they werent matching results from query so was always going to default!