It may not be "ok" but it is legal, unless you have a written employment contract specifying your salary. (If you do, the employer must honor the contract, and you could sue them for breach of contract if they don't.) When there is no contract, an employer is free to change how an employee is paid (e.g. hourly vs. salary) and how much they are paid at will, as part of "employment at will."