Fixed bug with signed-unsigned cast.