Fix functional bugs v1.2