added patch from raduangelescu
removed unused stuff