Fixed bug in ViewProvider