fixing issues with error detection on vim