Bug fixes; more variable type flexibility