fixed tag assignment

and some other errors,
also cleared console debugs