fix three smapp bugs