fixed inline if statement syntax