Fixing bugs and helpers