Remove compilation warnings due to implicit casting