fixed cast warning