Yeah this should be reworked to avoid that bug.