moved rel check to prevent errors