Fixed compiler warnings about implicit convesion.