fixed settings page. fixed update function and added findBySlug function in posts