Fixed another bug in dev branch