solved bugs after changes