fixed form bugs