Better period management and bugfix for params