BUG FIXES: increased stability