fixing res