fix type and style error