fix bug when tested with real world app