Made a typeconversion that fixes some problems