Temporary fix, should be solved with a better query