Fixed Bug with Res