Fixes from Feng