Undefined variable (#7) and wrong prefix (#10) fix