Fix page build error

Stupid nested if blocks