Fixed minor bugs preventing usage