Better handling of processes