Fixed silent casting error