fixing errors for patch