Previous commit bug fixes