correct minors bugs