last tweaks for the procedure to work correctly