Bug 1621

https://gist.github.com/novirael/9e93fea5cdbbf4ed2ffb