fixed warnings due to type conversion