Dont check direction in encode method

Small performance ;)