Fixed conversion warnings in visual studio