Replaced Commit fec2b2a3bdf97be6d35b6ca2abdb17ed526670c6 with a not so hacky soltution