Added brackets to fix typecasting errors