fixed small issue when setting initial values