Implemented workaround with terrible performance