That took quite a while to find this bug