fixed overnight stay trigger and function