Sorry for the trouble. I forgot to clear the cache while testing and it worked. After clearing all caches it gives on error.