fixed flags and changed load texture function to consider alpha channel