workaround for ids getting out of bounds