Fixed errors on initial load