Possible fix to resource parsing crashes + unfinished test code.