fixes multiple issues