Small fixes for types convertion