fixed boolean logic on scaffold