fix resrc bug