fixes multiple errors