Fixed the sign extension