Fixed post ordering and added error handlers