Fixes for bug on activity logging and a new validation