Wasn't correctly handling when there was no data