fix #49 and small resource fixes