quick fixes on the main script