[BUGFIX] Fix resource exceptions