fixed to gpu branch