Fix issue by: odontomachus

Thanks to: odontomachus

https://github.com/odontomachus/gitlabhq/commit/6f9ec107084fcfbdf291cb13073c8d2c879da247