Fixed checking dimensional consistency