Added simple error page and fixed bug in pagination