Changed input instead of casting to fix warning