kotlin cast fix