Resource bug fixes