Fix bugs from last commits