fix app ref error