Fixed casting error which broke the build