Fixed to remove a mix of tabs and spaces
Fixed code layout to follow the coding standar
Check for parentRow