Manually merged latests changed from djswagerman
Hack to make it work