Fix checking for first posts, add better exception handling