Fix for issue #26

This should fix #26 by not referencing an ID from the first query in the second one, but instead using the timestamp for both queries. Might not be as efficient, but it works ;)

@ptu please check if this breaks anything else. Seems to work fine, and I also added some performance optimization™.