Added brackets around line 888-892 for correct code!