fix getResource and getView methods